package cn.elwy.rcp.ui.table.listener;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

import cn.elwy.rcp.ui.table.TablePane;
import cn.elwy.rcp.ui.table.model.TableInfo;

public class TablePaneButtonListener extends SelectionAdapter {

  protected TablePane tablePane;
  protected TableInfo tableInfo;

  // 提高代码效率，暂把此方法置成final
  @Override
  public final void widgetDefaultSelected(SelectionEvent e) {
    super.widgetDefaultSelected(e);
  }

  public TablePane getTablePane() {
    return tablePane;
  }

  public void setTablePane(TablePane tablePane) {
    this.tablePane = tablePane;
    this.tableInfo = tablePane.getTableInfo();
  }

  public TableInfo getTablePaneInfo() {
    return tableInfo;
  }

}
